package pl.tssoft.math.core;

/**
 *
 * @author tomasz.serafin
 */
public class Value {

    private String name = "";
    final public double[][] real;
    final public double[][] imag;
    private boolean constant;

    /**
     * Creates scalar variable with value 0,0i
     */
    Value() {
        this(1, 1);
    }

    /**
     * Creates scalar value with given value
     */
    Value(double real, double imag) {
        this(1, 1);
        this.real[0][0] = real;
        this.imag[0][0] = imag;
    }

    /**
     * Creates matrix
     */
    Value(int rows, int columns) {
        real = new double[rows][columns];
        imag = new double[rows][columns];
    }

    void setName(String name) {
        this.name = name;
    }

    void setConstant(boolean constant) {
        this.constant = constant;
    }

    public String getName() {
        return name;
    }

    public int getRows() {
        return real.length;
    }

    public int getColumns() {
        return real[0].length;
    }

    public boolean isConstant() {
        return constant;
    }
}
